import service from "@/service";

//查询待办铃铛数据
export function queryPending(parameter) {
  let { tenantCode, userId } = parameter;
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/user/pushMessage/getToBeDoneCount`,
    method: "POST",
    customHeader: { tenantCode, userId },
  });
}

//查询钢筋加工待办列表
export function getGJJGList(data) {
  let { page, pageSize } = data;
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/beam/rebar-process/getToBeDoneList?page=${page}&pageSize=${pageSize}`,
    method: "POST",
    data,
  });
}

//查询工序报验待办列表
export function geGXBYList(data) {
  let { page, pageSize } = data;
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/beam/scheduleWbsProcedure/getDBLBList?page=${page}&pageSize=${pageSize}`,
    method: "POST",
    data,
  });
}

//查询梁生产任务待办列表
export function geLSCRWDList(params) {
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/beam/lcTaskManager/todolist`,
    method: "GET",
    params,
  });
}
//梁生产任务待办 确认
export function configPushMessage(params) {
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/beam/configPushmessage/updateToCompleteById`,
    method: "GET",
    params,
  });
}

//安全抓拍代办列表
export function getAQZPList(params) {
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/beam/zhgdSnap/todoList`,
    method: "GET",
    params,
  });
}
//试验管理代办列表
export function getSYGLXTList(data) {
  let {
    page,
    pageSize,
    orgCode = "",
    precativeOrgCode = "",
    reportNum = "",
    parentNum = "",
    dealStatus = "",
    startTime = "",
    endTime = "",
  } = data;
  return service({
    baseUrl: "gateWaybaseUrl",
    url: `/beamTrial/configPushmessage/warnListPage?page=${page}&pageSize=${pageSize}`,
    method: "POST",
    data: {
      orgCode,
      precativeOrgCode,
      reportNum,
      parentNum,
      dealStatus,
      startTime,
      endTime,
    },
  });
}
